package com.yfp.device.controller;

import com.yfp.device.domain.dto.OrderDetailWaitDTO;
import com.yfp.device.service.OrderDetailWaitService;
import com.yfp.common.core.web.controller.BaseController;
import com.yfp.device.domain.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/orderDetailWait")
@Tag(name = "订单预计排队时间接口")
public class OrderDetailWaitController extends BaseController {

    @Resource
    private OrderDetailWaitService orderDetailWaitService;

    @PostMapping("/saveQueueTime")
    @Operation(summary = "device-订单预计排队时间", description = "订单预计排队时间")
    public R<Void> saveQueueTime(@RequestBody List<OrderDetailWaitDTO> orderDetailWaitDTO) {
        orderDetailWaitService.saveQueueTime(orderDetailWaitDTO);
        return R.ok();
    }

}
